package ThreadDemo;

import lombok.extern.slf4j.Slf4j;

/**
 * @author wang'ji'cheng
 * @date 2025/7/30
 */
@Slf4j
public class Demo3 {
    public static void main(String[] args) throws InterruptedException {

        Thread t1 = new Thread("t1") {
            @Override
            public void run() {
                for (int i = 0; i < 100; i++) {
                    log.info("running");
                    try {
                        Thread.sleep(500);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                }
            }
        };
        t1.start();
        System.out.println(t1.getState());

    }
}
